Rect

interface Rect

A rectangle described by the location and dimensions.

Functions

Link copied to clipboard
open fun empty(): Rect
Returns an empty Rect with empty origin and size.
Link copied to clipboard
open fun height(): Int
Returns the rectangle vertical dimension.
Link copied to clipboard
open fun of(size: Size): Rect
Returns the Rect instance for the empty origin and the given size value.
open fun of(origin: Point, size: Size): Rect
Returns the Rect instance for the given origin and size values.
open fun of(width: Int, height: Int): Rect
Returns the Rect instance for the given width and height values.
open fun of(x: Int, y: Int, width: Int, height: Int): Rect
Returns the Rect instance for the given x, y, width, and height values.
Link copied to clipboard
open fun origin(): Point
Returns the upper-left corner of the rectangle.
Link copied to clipboard
open fun size(): Size
Returns the rectangle dimensions.
Link copied to clipboard
open fun width(): Int
Returns the rectangle horizontal dimension.
Link copied to clipboard
open fun x(): Int
Returns the horizontal coordinate of the upper-left corner of the rectangle.
Link copied to clipboard
open fun y(): Int
Returns the vertical coordinate of the upper-left corner of the rectangle.